package edu.mq.itec814

trait Computation {
  
  def factorial (n : Int) : Int = {
  	if (n==0) 
  		1 
  	else 
  		n * factorial(n-1)
  }
  
  def f (data : Data) : Int = {
    Thread.sleep(100)
    factorial (data.a + data.b)
  }
  
  def compute (list : List[Data]) : Int
  def compute (array : Array[Data]) : Int
}